package com.zhen.aikan.controller;

import com.zhen.aikan.service.IVersionService;
import com.zhen.aikan.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author LiJiaZhen
 * @date 2023/9/22 16:15
 */
@Api("app版本控制器")
@RestController
@RequestMapping("/api/version")
public class VersionController {
    @Autowired
    private IVersionService versionService;

    @ApiOperation("获取版本")
    @GetMapping("/version")
    public Result getVersion(){
        Map<String,Object> versionMap =versionService.getVersion();
        return Result.ok(versionMap);
    }
}
